package com.how.warlock.entities;

import com.how.warlock.Game;
import com.how.warlock.engine.Sprite;
import com.how.warlock.player.Player;


public class MovingEntity extends Entity {
	protected double mx, my;
	
	protected double oldx, oldy;
	
	public MovingEntity(int x, int y){
		super(x, y);
	}
	
	public MovingEntity(Sprite sprite, int x, int y){
		super(sprite, x, y);
	}
	
	public void move(long delta){
		x += (mx*delta)/1000;
		y += (my*delta)/1000;
	}
	
	public void setMovement(double mx, double my){
		this.mx = mx;
		this.my = my;
	}
	
	public void collision(){
		oldx = x;
		oldy = y;
	}
	
	public void setMX(double mx){
		this.mx = mx;
	}
	
	public void setMY(double my){
		this.my = my;
	}
}
